#ifndef __CORE_SINGLETONBASE_H__
#define __CORE_SINGLETONBASE_H__

#define SINGLETON_IMP(name) \
friend boost::shared_ptr<name> boost::make_shared<>(); \
              \
public:       \
   ~name() {} \
private:      \
   name() {}  \

#define SINGLETON_ONLYDEF(name) \
friend boost::shared_ptr<name> boost::make_shared<>(); \
            \
public:     \
   ~name(); \
private:    \
   name();  \

namespace boost {
   template<typename T>
   class shared_ptr;
}

namespace raytracer {

class SingletonManager;

class SingletonBase
{

friend class SingletonManager;

protected:
   SingletonBase() {}
   virtual ~SingletonBase() {}
   virtual void break_bridge() {}
};

} //end of namespace

#endif //__CORE_SINGLETONBASE_H__
